<?php
/*
 * Debug Class
 * 
 * 	Debug Mode 
 * 
 * @author : Jason Meulenhoff
 * @mail : mail@kacangboi.com
 * @web : http://kacangboi.com
 * @copyright : KacangNetworks 2010
 * 
 */

class debug
{	
	static $errors = array();
	
	static function message($message,$state,$color = 'black')
	{
		if(DEBUG){
			$message = array($state,"<p style='line-height : 5px;'><span style='color : $color;'>{$state} </span> @ ".date("H:i:s"). "@" . $_SERVER['REMOTE_ADDR']. " {$message} </p>");
			array_push(debug::$errors,$message);
		}
	}
	static function returnErrors()
	{
		return debug::$errors;
	}
}
?>